export enum OrderRule {
  DESC = "descending",
  ASC = "ascending",
}

export type TableRecord = Record<string, any>;
export type SearchModel = Record<string, any>;

export interface PaginationParam<T extends SearchModel> {
  current?: number;
  model?: T | {};
  order?: OrderRule | "";
  size?: number;
  sort?: string;
}

export interface PaginationResult<T extends TableRecord> {
  current: number;
  pages: number;
  size: number;
  total: number;
  records: T[];
}

export type DeleteParams = ID[] | TableRecord;

export type ID = string | number;

export enum UploadFileType {
  IMAGE = "IMAGE",
  VIDEO = "VIDEO",
  AUDIO = "AUDIO",
  DOC = "DOC",
  OTHER = "OTHER",
}
export interface UploadResult {
  bizType: string;
  bucket: string;
  contentType: string;
  fileId: number;
  fileMd5: string;
  fileType: UploadFileType;
  originalFileName: string;
  path: string;
  size: number;
  suffix: string;
  tenantCode: string;
  uniqueFileName: string;
  url: string;
}

export interface MapLocation {
  latitude: string;
  longitude: string;
}
